﻿using Application.RolepermissionService;
using Domain.Entity.zct;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WMSManage.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class RolePermissionController : ControllerBase
    {
        private readonly IRolePermissionService rolepermissionService;

        public RolePermissionController(IRolePermissionService rolepermissionService)
        {
            this.rolepermissionService = rolepermissionService;
        }

        /// <summary>
        /// 查询所有:ID
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<RolePermission>> Getpid(int pid)
        {
            List<RolePermission> getRolePermissions = await rolepermissionService.Getpid(pid);
            return getRolePermissions;
        }
    }
}
